home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zoom 2
/
Zoom - Release 2 (1996)(Active Software)[!].iso
/
games
/
think
/
grac
/
docs
/
reference.doc
< prev
next >
Wrap
Text File
|
1995-09-10
|
23KB
|
611 lines
GRAC Reference
--------------
This file is a guide to using the GRAC editor. The information is arranged
by menus and kept brief. For more in-depth explanations see
'Introduction to GRAC'.
Starting up
-----------
Run the program by double-clicking on the icon. Multi-tasking with
other programs is possible; flip to workbench by pressing Left Amiga-G. Of
course, you can multi-task with this file as an alternative to printing it
out.
The Main Menu
-------------
Characters
----------
Create and edit characters with this section of the program. If you
have not previously created characters you will be prompted for a name, then
a device. Otherwise you can select a character from a requester. Then the
character editing screen appears.
EXIT and SAVE are self-explanatory. NAME is for changing the
characters name, and PATH changes the path of the saved file. COLOUR is for
setting the colour of the text that appears when the character speaks.
DELETE removes the character file.
Below the top menu is a slider for moving through the animation
frames, of which there are 100. You will note that the first 48 are used for
preset actions such as walking, reaching or talking. For details on
producing these animation frames see 'Introduction to GRAC'.
All graphics are grabbed from Iff files. To grab an image, first
load a picture using LOAD PIC, then click on GRAB. Draw a box around the
image; be sure not to grab a box any larger than you need because this
wastes memory. A mouse click is then required to set the hot-spot, which is
like the handle in Dpaint; it is the point GRAC uses to position the
character. This should usually be below the character's feet. A right click
sets the hot spot to roughly the bottom centre.
The arrows scroll the image around the window. HOT-SPOT allows the
hot-spot to be repositioned.
LOAD is a little needed but useful function used to load characters from
other games, which saves grabbing every frame again.
Objects
-------
In most respects this is identical to the character editor. There is now
a button labelled CHARACTERS which operates as follows:
Each object bank can have five associated characters. When a room loads
an object bank it also loads these characters. Choosing these characters
uses TWO requesters which could be a little confusing so read the
explanation carefully.
The 'Choose a character' requester is for choosing from the list of
characters already associated with the objects. You may choose to replace a
character or add a new one.
The 'Choose new character' requester is a choice from all available
characters for addition to the list. If you don't want to add a character,
select 'no character'.
The titles 'mouse' and 'mouse wait' are only relevant if this object bank
is to be used for the control panel, in which case these objects will be
used as the mouse. The mouse pointer is drawn using colours 17, 18 and 19 in
the room palette, and should be grabbed from a 4 colour screen. It can be no
more than 16 pixels across. How do you have colours 17, 18 and 19 in a four
colour palette? Well, colour 1 on the four colour screen will become colour
17 when the mouse is displayed over a 32 colour screen, colour 2 becomes 18
and so on. (nb. colours are labelled 0 to 31. In Dpaint 3, colour 17 is in
the third column, second colour down.)
Rooms
-----
It is necessary to design the room and create a picture, objects and a
control panel before using this section, so if necessary skip this part and
return when you are ready.
If you are creating a new room, you will be prompted for a name, picture,
objects and path. Otherwise everything is loaded automatically.
I think that the functions of the top row of buttons are entirely
obvious, so I will begin with WALK.
I should mention here that the menus can be dragged using the mouse, and
the main screen is scrolled using the arrow keys.
WALK (Submenu):
Clicking on WALK brings up a submenu. This is for editing walk zones
which define the areas on the screen where characters can walk. Use ADD to
create a new zone. The zone is drawn as a rectangle using the mouse. You
should cover the entire floor area in this way. Any zones which are
touching should normally be JOINED, which lets GRAC know that characters can
walk from one zone into the other. Join two zones by clicking on JOIN, then
the two zones.
GRAC uses an automatic route finder to direct characters between zones,
but you should give it as much help as you can by:
1. Using the smallest number of zones possible. The more zones, the
slower the route finding will be.
2. If there is more than one route from on zone to another, make sure
that the shortest one goes through the least number of zones. GRAC's
definition of the shortest route is to go through the fewest number of
zones. For example, don't have zones like this:
------------------------------
| 1 * |
------------------------------
| 2 | | 3 |
| | | |
------------------------------
| 4 # |
------------------------------
If a character had to go from * to #, they would walk all the way
around, through zone 2, which would look very odd. Instead, use:
------------------------------
| 1 | 2 |
------------------------------
| 3 | | 4 |
| | | |
------------------------------
| 5 | 6 |
------------------------------
This way, a path from 2 to 6 will go through zone 4.
You may want an event to occur when the player's character steps into a
zone, such as a new screen loading. This is achieved by assigning a script
to the walk zone. Click on SCRIPT, then on the zone. For details on using
scripts see the section at the end of this file.
FLAG assigns a flag to a zone in a similar way to SCRIPT. Flags are also
detailed at the end of the file. The walk zone will be deactivated if the
flag is FALSE.
DELETE removes a zone.
HEIGHT is for creating walkways, bridges and staircases which are not
flat on the floor but are three dimensional. The operation is as follows:
Click on HEIGHT, then on each of the zones that make up the bridge,
walkway or whatever. When selected the zones are highlighted. Click the
right mouse button to end selection. Set the height with two click and drag
actions.
(technical note: HEIGHT is all about object priority. This is normally
dependent on Y position, but HEIGHT allows the character to appear
sometimes in front of and sometimes behind an object, depending on which
zone the character is in. The click and drag actions should be from the
lowest point of the selected zones to the point on the floor directly
underneath, then from the highest point to the point on the floor underneath
that. Height also affects character scaling.)
Startup:
This is for editing the script which runs every time the room is loaded.
The script is executed before the screen fades in.
Background (Submenu):
Background objects (as opposed to foreground objects) are used whenever
i) The object will never need to appear in front of a character,
ii) the object does not need to move or perform cyclic animations, and
iii) the object cannot be picked up.
You should use background objects whenever you can because they consume
less memory and processor time than foreground objects, although they are
less versatile.
You can create a new background object by selecting ADD. Draw the object
as a rectangle using the mouse. At this stage the object will not appear
during the game as it has no name. You can give the object a name using the
NAME button. Click on the object then type in a name.
Actions is used for assigning scripts to the object. Every verb can have
a separate script, which is executed whenever the player selects that verb
and the object. Objects are selected by name, so give a name to the object
first.
FLAG assigns a flag to the object. The object will be deactivated if the
flag is FALSE.
DELETE removes the object.
POSITION sets a point which is used when an image is pasted onto the
object. You are given the option to select an image to act as a reference.
However, the image is not actually pasted until specified in a script.
BASE sets another point. Do not confuse this with POSITION; BASE sets the
point on the ground which the character walks to when using the object. The
first mouse click sets the point, and the second which zone the point is in.
(Important if two or more zones are overlapping.) Then choose the direction
which the character should face, and the objects height, which is used when
a character reaches for the object.
Use STRING to edit a string which is used when the object is examined.
ZONE allows you to change the rectangle surrounding an object.
Foreground objects (Submenu):
Most of the buttons in this menu are identical in function to their
equivalents in the background menu, so refer to that where necessary.
If objects cannot be selected by name, the requester operates using two
buttons, NEXT and PREVIOUS. The selected object flashes on an off. Because
of this it is not a good idea to have an object identical to the picture
underneath it, as the flashing will not be visible.
ADD is used to create a new object. Choose an image, then position it.
IMAGE changes the image used by an object.
HIDE removes all objects from view, so that you can see behind them.
Select HIDE again to make them visible.
TAKE is used to choose an item from the inventory which the object will
become when it is picked up.
Points (Sub menu):
A point is a position on screen, combined with a zone and direction.
Some script commands refer to points as positions for characters to walk to
or stand.
Create a new point with ADD. You need to set the position with the mouse,
the walk zone that the position is in, then the direction.
IDENTIFY tells you the number of a point. This is needed because if a
script uses the LOADROOM command, it refers to a point in a different room,
so it is impossible to select it with the mouse.
DELETE removes a point.
Picture:
This option changes the picture used by the room.
Returning to the main menu,
Picture
-------
All backgrounds, the control panel, and palettes originate from iff
files. They are then compressed and saved by GRAC as picture files.
First select a picture from the requester, or choose 'new picture'. If
this is a new picture, select an iff file, then the path for the saved
picture.
A menu then appears from which you can save or delete the picture,
rename it, change the path or load a new picture. The SIZE button allows you
to change the height of the picture. The portion of the screen below the
point where you click is deleted. This is only needed because of the way
Dpaint saves pictures.
Sound
-----
Sound includes music and samples. If you have not previously loaded a
music file, a requester will appear asking you to choose a soundtracker or
med module. Select one, or cancel, then choose the path. Because you are
only allowed one module, it is best to make it a multimodule, containing
several tunes. Music is played within GRAC via script commands.
The buttons' functions are straightforward. SAMPLES allows you to load a
raw sample from disk, or choose one which has already been loaded.
samples (submenu): A row of buttons which you should be able to work out.
Start
-----
When the game begins, the player's character will be standing at a certain
point in a certain room. Use this button to set the room, character and
point.
Fonts
-----
This button is used to set the fonts to be used by the game. You need to
enter the name and size of the fonts for text and speech.
Animation
---------
This is for loading iff animations (the type used by Dpaint). The
functions are easy enough to work out. Animations are played from within
scripts, using the 'play anim' command.
Text
----
This is for editing the text strings which are used in the adventure.
Select a string, or choose 'new string', then enter the text.
The '@' character is used to indicate a new line when the text is
printed. Word-wrapping is automatic, also the text is split up into
sentences when spoken.
In GRAC version 1, these were the only text strings there were. Now there
are the 'main' strings which can be used anywhere in the game, and the
'room' strings which can only be used in one room. Using this button you
can edit the 'main' strings. When editing strings from within a room,
the text selector will have a MAIN button which allows you to access the
'main strings'. Usually there will be no need to.
Controls
--------
The basic control panel is just a picture. It will need to be smaller
than a full screen so if you are using Dpaint, save it as a brush.
The graphics for depressed buttons, and also the mouse pointer come from
an object bank, which you need to create first.
When creating the control panel you will need to choose a picture, object
bank and path. The edit controls menu then appears.
In the top row of buttons the only one which may need explaining is SIZE.
This is used to set the size of the graphics screen, first the width, then
the height, both in pixels. The default is 320*170.
Verbs (Submenu):
Verbs are needed to allow the player to interact with the game world. A
typical verb is examine, which, if selected, would print a text string
describing an object. A GRAC game can have up to ten verbs.
To add a new verb, select ADD. Type in the name, draw the button as a
rectangle, select images for 'down' and 'up' and finally position the image.
NAME allows you to change the name of a verb.
SCRIPT is for editing the script which is executed whenever the verb is
used. Typical scripts are as follows:
For 'examine':
go pc walk up to the object. -1
indicates the player's character.
wait stop 0 wait for the player's character to
stop.
print string print the text string assigned to
the object.
For 'take':
go pc
wait stop 0
take pc,object take the object if possible.
Most other verbs:
go pc
wait stop 0
execute execute the appropriate script.
BUTTON is for changing a button. the procedure is the same as when adding
a verb.
TYPE sets the kind of objects that can be used with the verb.
ANY means that the verb can be used on anything (eg. examine)
INV means that the verb can only be used on the inventory (eg. use)
ROOM means that the verb can only be used on items not in the
inventory (eg. take)
The next three types are for verbs involving two objects. The
first object must be from the inventory. These types also need a
connecting word, such as 'with'.
Finally, type QUICK means that no object is required, the verb will
take effect as soon as the player clicks on the button.
The remaining button, STRING is for editing the default string which is
printed if the verb fails, such as trying to take an object which is too
heavy.
Message:
A single mouse click is required to set the position at which messages
are printed. Messages are generated by GRAC and are usually the current
verb and the object under the mouse pointer.
Window:
The window is the area where text is printed, and the inventory is
listed. Draw the window as a rectangle using the mouse.
Pen and Paper:
These buttons set the colours used to print text.
Position:
The graphics screen and control panel can be positioned as you wish. Move
the screens with the mouse and click the left button when ready.
Paths
-----
Paths tell GRAC where to find all of the files needed by a game. They
will usually be something like 'Disk1:' or on a hard disk, 'Work:GRAC/'.
Every file used by a game will have a path. If GRAC doesn't find it there,
the game will not run, so it is important that you don't move any files
around except within the editor itself. GRAC files all begin with the letters
GRAC except for the main file (accessed with the SAVE GAME and LOAD GAME
functions) which you can name to whatever you like. Just for the record,
these are the files needed by a game:
gracplayer required to be in the same drawer as the main file
fonts the required fonts in the FONT: drawer
GRAC.cont the control panel
GRAC.inv the inventory
GRAC.song soundtracker or med module (optional)
GRAC #.room one file for each room
GRAC #.picture one file for each picture (AMOS packed picture)
GRAC #.character character images (AMOS bob bank)
GRAC #.object object images (AMOS bob bank)
GRAC #.sample raw samples
GRAC #.closeup one file for each close up
GRAC #.anim iff animations
Inventory
---------
If you have not edited the inventory before, it is first necessary to set
a path for the saved file. Then the inventory menu appears.
ADD creates a new item. It is necessary to give it a name.
Skipping the obvious buttons, ACTIONS is used to attach scripts to each
verb acting on the item. First select an item, then a verb, then edit the
script.
STRING is for editing the text description of the item.
Character actions
----------------
This operates in the same way as ACTIONS in the inventory menu, except
that now you choose a character instead of an item.
Character strings
-----------------
Edit the text descriptions of characters.
Close-up
--------
A close-up is similar to a room, but characters will not appear on it,
and clicking on a zone creates an immediate effect. The control panel is
not visible.
This could be used if the player 'examines' a console; the screen would
then show a close-up of the controls, and the player could click on the
buttons using the mouse. Alternatively, it could be a map screen, and
clicking anywhere on it takes the player to that location.
The top row of buttons work in the same way as in the room editor. The
others are:
Add zone:
Draw the zone as a rectangle, choose images for the button in 'up' and
'down' positions, then place the image using the mouse.
Set zone:
As with ADD ZONE, but you have to choose an existing zone first.
Del zone:
Deletes a zone.
Script:
Assigns a script to the selected zone. The script will be executed when
the player clicks on the zone.
Startup:
The script that is executed when the close-up is run.
Save path
---------
Games will be saved to this path.
New
---
If confirmed, this option clears everything.
Load game
---------
Load a previously saved GRAC game. (filename ends in .grac) These files
contain all of the paths for every other file, plus a few other things.
They do not contain any graphics, sound or rooms, these are saved
separately.
Save game
---------
You should always save before quitting, if you have made any changes to
any part of the adventure, otherwise you may lose them. Saved games have
icons, and clicking on the icon will run the game. Make sure that the file
'gracplayer' is in the same drawer as the game. This file does not have an
icon. To copy it, either use 'show all files' in the workbench menu, or use
the CLI.
Text colour
----------
Choose white or black text to maximise legibility.
Quit
----
Requires confirmation, so make sure that you have saved first.
Scripts
-------
Scripts are what give GRAC its power and versatility, and they are also
the most complex part of the program.
Basically, a script is a mini program. It contains a sequence of
instructions with up to two parameters, which are executed when the script
is called by any of a number of events. In structure they are probably
closer to machine code than anything else, although the commands themselves
have similarities to Basic.
The full instruction set is listed in another file, but take as an
example, 'print'. As you would expect, this prints a string of text. Only
the first parameter is used, and this holds the number of the string to be
printed. (All parameters are integers, even for string commands.)
Unlike the Basic instruction, the GRAC version of 'print' also selects the
text window, avoids splitting up words by moving them onto the next line
and then waits for a mouse click to say that the player has finished
reading.
Scripts are edited as in a text editor, using the arrow keys or the mouse
to move the cursor around.
In the top right corner is the script number. You can move between
scripts using the arrows or clicking on GO TO. Rooms use scripts 0 to
49, verbs 50 to 59, the inventory 60 to 149 and characters 150 to 200.
CLEAR removes all instructions from the script, and frees it for further
use.
Click on OK when you have finished to leave the script editor. Usually
the script that you end on will be assigned to the command printed at the
top. The exception is startup scripts which are always script 0.
There are also some key commands. F2 moves to the next script and F1
moves to the previous script. DEL deletes the current line. Shift-up to
move up one page, shift-down to move down a page.
A very useful key is HELP. It lets you select the parameters of the
current instruction from whatever selector is appropriate. For example,
'print' (return) then HELP brings up a text selector.
Flags
-----
Flags are the equivalent of variables in Basic. They hold integers,
positive or negative, and are referred to by a number. The main use for flags
is so that GRAC can remember what has already happened in an adventure.
There are several script commands for dealing with flags.
Be careful not to confuse the value held by a flag, with the number of the
flag; they are entirely different things.
As well as an integer value, flags have a logical value. This is either
FALSE, if the flag is equal to zero, or TRUE, if it isn't. If objects or
walk zones are assigned a flag, they will disappear if the flag is FALSE.
There are 1000 flags. You cannot change flag 0, it is always TRUE.
The other flags can be changed as you wish. GRAC uses a minus sign to
indicate 'not', so flag number -1 is FALSE if flag 1 is TRUE and vice versa.
All flags (except flag 0) start the game as FALSE, that is, they hold the
value 0. When the game is saved, the values of all of the flags are saved. I
recommend that you write down what all the flags used in your adventure
mean, because it is easy to lose track.